home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Table / Sources / Views.fr < prev   
Encoding:
Text File  |  1996-09-17  |  3.7 KB  |  121 lines  |  [TEXT/CWIE]

  1. //========================================================================================
  2. //
  3. //    File:                Views.fr
  4. //    Release Version:    $ ODF 2 $ 
  5. //
  6. //    Contains:            Common (Platform independent) resources for the Table part
  7. //
  8. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef FWRESFIL_K
  13. #include "FWResFil.k"
  14. #endif
  15.  
  16. #ifndef FWVIEWS_FR
  17. #include "FWViews.fr"
  18. #endif
  19.  
  20. #ifndef FWNOTDEF_H
  21. #include "FWNotDef.h"     
  22. #endif
  23.  
  24. #ifndef DEFINES_K
  25. #include "Defines.k"
  26. #endif
  27.  
  28. //========================================================================================
  29. // type RTableView
  30. //========================================================================================
  31. // RTableView doesn't add any field to FW_RSuperView
  32. // IMPORTANT: the resource label below must match LTableView declared in the .cpp file 
  33.  
  34. type RTableView : FW_RSuperView(Label='tbvw')
  35. {
  36. };
  37.  
  38. //========================================================================================
  39. // type RTableScroller
  40. //========================================================================================
  41. // RTableView doesn't add any field to FW_RSuperView
  42. // IMPORTANT: the resource label below must match LTableView declared in the .cpp file 
  43.  
  44. type RTableScroller : FW_RScrollBarScroller(Label='tbsc')
  45. {
  46. };
  47.  
  48. //========================================================================================
  49. // resource RDrawFrame(kDrawView)
  50. //========================================================================================
  51. // See constants in "FWViews.k", macros & resource types in "FWViews.fr"
  52.  
  53. // Reference size for the table frame (will be adjusted at runtime)
  54. #define H     FW_FIX(1000)
  55. #define H1     H + FW_FIX(1)
  56.  
  57. // Drawing extent (constants defined in Defines.k to be used also in .cpp files)
  58. #define X    FW_FIX(kDrawingSizeX)
  59. #define Y    FW_FIX(kDrawingSizeY)
  60.  
  61. resource FW_RFrameLayout(kTableView)
  62. {
  63.     {H,H},                    // LayoutSize
  64.     {                        // Start list of frame's subviews
  65.         RTableView
  66.         (
  67.             kTableViewID,                    // View id
  68.             {0, 0, H-FW_SBSIZE, H-FW_SBSIZE},    // Bounds
  69.             FW_kFitToEnclosure,                    // bindings
  70.             {X,Y},                                // extent
  71.             1,                                    // Make it the ContentView
  72.             FW_kXYScrolling,                    // scrolling in both directions
  73.             {}                                    // no SubViews
  74.         ),
  75.         FW_RScrollBar            // Horizontal SB
  76.         (
  77.             kHorzScrollBarID,                    // View id
  78.             {-FW_ONE, H-FW_SBSIZE, H1-FW_SBSIZE, H1},// Bounds
  79.             FW_kHScrollBarBinding,                // Standard horizontal SB bindings
  80.             0,                                    // control message
  81.             0,                                    // control receiver
  82.             0,                                    // control value
  83.             0,                                    // SB Min Value (adjusted at runtime)
  84.             1,                                    // SB Max Value (adjusted at runtime)
  85.             FW_ONE,                                // SB Minor Units (adjusted at runtime)
  86.             FW_ONE                                // SB Major Units (adjusted at runtime)
  87.         ),
  88.         FW_RScrollBar            // Vertical SB
  89.         (
  90.             kVertScrollBarID,                    // View id
  91.             {H-FW_SBSIZE,-FW_ONE, H1, H1-FW_SBSIZE},// Bounds
  92.             FW_kVScrollBarBinding,                // Standard vertical SB binding
  93.             0,                                    // control message
  94.             0,                                    // control receiver
  95.             0,                                    // control value
  96.             0,                                    // SB Min Value (adjusted at runtime)
  97.             1,                                    // SB Max Value (adjusted at runtime)
  98.             FW_ONE,                                // SB Minor Units (adjusted at runtime)
  99.             FW_ONE                                // SB Major Units (adjusted at runtime)
  100.         ),
  101.         FW_RGrowBox
  102.         (
  103.             kGrowBoxID,                            // View id
  104.             {H - FW_SBSIZE, H - FW_SBSIZE, H1, H1},    // Bounds
  105.             FW_kGrowBoxBinding                    // standard grow box binding
  106.         )
  107.     },
  108.     {                            // Scroller
  109.         RTableScroller
  110.         (
  111.             FW_FIX(15),                            // AutoScrollInset
  112.             {FW_FIX(1), FW_FIX(1)},                // ScrollUnit
  113.             1,                                    // Responds to function key
  114.             0,                                    // Live Scrolling
  115.             kHorzScrollBarID,                    // horiz sb id
  116.             kVertScrollBarID                    // vertical sb id
  117.         )
  118.     }
  119. };
  120.  
  121.